<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<ui:composition template="templates/mainTemplate.xhtml">
	<ui:define name="content">
		<div class="box">
			<h2>
				<a id="toggle-register" href="#"><h:outputText
						value="#{msg['register.registerForm']}" /></a>
			</h2>
			<div id="register" class="block forms">
				<h:form id="register-form">
					<fieldset class="login">
						<legend>
							<h:outputText value="#{msg['register.register']}" />
						</legend>
						<p:message for="regButton" showSummary="false" />
						<p:message for="username" showSummary="false" />

						<p>
							<label><h:outputText
									value="#{msg['loginLogoutMenu.email']}" /></label>
							<p:inputText id="username" value="#{registerBean.login}"
								required="true" label="#{msg['loginLogoutMenu.email1']}"
								title="#{msg['register.ToolTip.login']}" />
							<p:tooltip for="username" showEffect="fade" hideEffect="fade" />
						</p>

						<p:message for="password1" showSummary="false" />
						<p>
							<label><h:outputText
									value="#{msg['loginLogoutMenu.pass']}" /></label>
							<p:inputText id="password1" value="#{registerBean.pass1}"
								type="password" required="true"
								label="#{msg['loginLogoutMenu.password1']}"
								title="#{msg['register.ToolTip.password']}" />
							<p:tooltip for="password1" showEffect="fade" hideEffect="fade" />
						</p>

						<p:message for="password2" showSummary="false" />
						<p>
							<label><h:outputText
									value="#{msg['loginLogoutMenu.repass']}" /></label>
							<p:inputText id="password2" value="#{registerBean.pass2}"
								type="password" required="true"
								label="#{msg['loginLogoutMenu.password1']}"
								title="#{msg['register.ToolTip.password']}" />
							<p:tooltip for="password2" showEffect="fade" hideEffect="fade" />
						</p>

						<div class="grid_10">
							<p:message for="captcha" showSummary="false" />
							<p>
								<p:captcha id="captcha" theme="clean"
									label="#{msg['register.captcha']}"
									validatorMessage="#{msg['primefaces.captcha.INVALID_detail']}" />
							</p>
						</div>

						<p:commandButton id="regButton" action="#{registerBean.validate}"
							binding="#{registerBean.button}" ajax="false"
							value="#{msg['register.registerButton']}" style="width: 100%" />
					</fieldset>
				</h:form>
			</div>
		</div>
	</ui:define>
</ui:composition>

</html>
